﻿@model Coevery.Fields.Fields.PhoneField
@using Orchard.Utility.Extensions;
@using Coevery.Fields.Settings;
@{
    var settings = Model.PartFieldDefinition.Settings.GetModel<PhoneFieldSettings>();
}


<label class="control-label" for="@Html.FieldIdFor(m => m.Value)">@Model.DisplayName</label>
<div class="control controls errortips">
    <input type="text" 
           id="@Html.FieldIdFor(m => m.Value)" 
           name="@Html.FieldNameFor(m => m.Value)"
           value="@Model.Value"
        @if (settings.Required) {<text> required="required"</text> }
        @if (settings.ReadOnly) {<text> readonly="readonly"</text> }
           class="textMedium span12 phonenumber" 
        @if (!string.IsNullOrWhiteSpace(settings.HelpText)){<text>helper:text='@settings.HelpText'</text> } 
        />
    @Html.ValidationMessageFor(m => m.Value)
</div>
